#ifndef __TIMER1_H__
#define __TIMER1_H__

#include "Timer_config.h"

#if USE_TIMER1

#include "gd32f4xx.h"
#include "systick.h"


void Timer1_init();
void Timer1_config(uint32_t prescaler, uint32_t period);


#if TIMER1_FUNC == TIMER_FUNC_OUTPUT

#if USE_TIMER1_CH0
void Timer1_ch0_update(float duty);
#endif

#if USE_TIMER1_CH1
void Timer1_ch1_update(float duty);
#endif

#if USE_TIMER1_CH2
void Timer1_ch2_update(float duty);
#endif

#if USE_TIMER1_CH3
void Timer1_ch3_update(float duty);
#endif

#elif TIMER1_FUNC == TIMER_FUNC_INPUT
short Timer1_input_read();
#endif


#endif

#endif